package com.adcc.loadsheet.billing.service;

import com.adcc.loadsheet.billing.entity.contractuser.ContractUserEntity;
import com.adcc.loadsheet.billing.vo.PbStaffTreeVO;
import com.adcc.loadsheet.billing.vo.chargerule.BillingRuleEntityVO;
import com.adcc.loadsheet.billing.vo.ScAirlinesEntityVO;
import com.adcc.loadsheet.billing.vo.ScAirportEntityVO;
import com.adcc.loadsheet.billing.vo.contractuser.ContractUserEntityVO;
import com.adcc.loadsheet.billing.vo.contractuser.ContractUserTreeVO;

import java.util.List;
import java.util.Map;

/**
 * 合同用户表Service
 * Created by zhaoml on 2020/4/13.
 */
public interface ContractUserService {

    List<ContractUserEntity> select(Map<String, Object> map);

    //获取合同用户Tree
    List<ContractUserTreeVO> getTreeNode();

    //查询合同用户
    ContractUserEntityVO findByContractUserId(Map<String, Object> paramMap);

    //查询合同用户
    ContractUserEntity selectByPrimaryKey(Integer contractUserId);

    //根据用户简称查询对应实体
    ContractUserEntity findByUserAbbrev(String userAbbrev);

    //编辑合同用户
    ContractUserEntity edit(ContractUserEntityVO contractUserEntityVO);

    //删除合同用户
    String deleteByContractUserId(Integer contractUserId);

    //编辑计费范围
    String editBillingRange(ContractUserEntityVO contractUserEntityVO);

    //查询机场，并设置是否选中
    List<ScAirportEntityVO> selectAirports(Integer contractUserId, Map<String, Object> map);

    //查询航司，并设置是否选中
    List<ScAirlinesEntityVO> selectAirlines(Integer contractUserId, Map<String, Object> map);

    //获取关联用户Tree，并设置是否选中
    List<PbStaffTreeVO> getAssociatedUsersTreeNode(Integer contractUserId, Map<String, Object> map);

    //编辑关联用户
    String editAssociatedUsers(ContractUserEntityVO contractUserEntityVO);

    //一个登录用户不能被两个合同用户关联（如果选择的登陆用户已经被其他合同用户关联过，则系统进行提示“用户已经被合同用户关联，不能保存！”）
    String selectOtherContractUser(ContractUserEntityVO contractUserEntityVO);

    //查询计费规则，并设置是否选中
    List<BillingRuleEntityVO> selectBillingRules(Integer contractUserId, Map<String, Object> map);

    //编辑计费规则
    String editBillingRule(ContractUserEntityVO contractUserEntityVO);

    //查未指定计费规则的合同用户
    String selectNoBillingRule();
}